﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tools.Base
{
    public class NormalTool
    {
        public static string ListToString<T>(List<T> lsInfo, char strSplit = ',')
        {
            if (lsInfo == null)
                return "";

            try
            {
                StringBuilder sb = new StringBuilder();
                for(int i = 0; i < lsInfo.Count; i++)
                {
                    if(sb.Length != 0)
                    {
                        sb.Append(strSplit);
                    }

                    sb.Append(lsInfo[i].ToString());
                }

                return sb.ToString();
            }
            catch(Exception)
            {
                return "";
            }
        }
    }
}
